package com.itheima.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author :wujunjie
 * createTime :2022-12-27 11:45
 * description :
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResultVo {
    private String host;
    private Integer code;
    private String errorMessage;
    private Object data;




    public static ResultVo success( ){
        return new ResultVo(null,200,"success",null);
    }
    public static ResultVo success(Object data){
        return new ResultVo(null,200,"success",data);
    }

    public static ResultVo error(){
        return new ResultVo(null,501,"error",null);
    }
    public static ResultVo error(String msg){
        return new ResultVo(null,501,msg,null);
    }
}
